Problem Note 48504: Incorrect data are returned when reading Teradata VARCHAR data when a remote library is present with PROC SQL pass-through code
VARCHAR values might be returned as blank data rather than the actual values when you use SAS/ACCESS
® Interface to Teradata in SQL pass-through code. The problem occurs when a remote library assignment is present in the SAS code that is run. The remote library does not have to link to the Teradata database in any way. It simply must be present in the code. The problem occurs even if the remote library is cleared using a LIBNAME CLEAR; statement. The following code illustrates the problem and how to re-create the issue:
libname test teradata server=myteradataserver user=myuser password=mypass;
proc sql;
drop table test.vc_class;
quit;
data test.vc_class (dbtype=(name='varchar(40)')); set sashelp.class;
run;
/* this LIBNAME when submitted will cause the problem in the SQL pass-through code below */
options remote=local sascmd="!sascmd";
signon local;
libname rwork slibref=work server=local;
/* non pass-through code works fine to this table, the name field is not blank*/
proc sql;
create table mytable as
select * from test.vc_class;
quit;
proc print data=mytable;
format name $hex32.;
run;
/* sql passthru to teradata with remote library, the varchar name field is blank */
libname rwork clear;
run;
proc sql;
connect to teradata ( server=myteradataserver user=myuser password=mypass);
create table work.myvarchar as
select * from connection to teradata
(
select * from vc_class
);
disconnect from teradata;
quit;
proc print data=work.myvarchar;
format name $hex32.;
run;
When you compare the output, you see
blanks, (hex 20), in the output for the name field in the
myvarchar SAS data set instead of the actual data itself.
To resolve the problem, do one of the following:
- If you are running SAS® 9.3 TS1M0, upgrade to SAS® 9.3 TS1M2.
- If you are running SAS® 9.3 TS1M1, either upgrade to SAS 9.3® TS1M2 or apply the hot fix that is available from this link:
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Teradata | Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Microsoft Windows XP Professional | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.3 TS1M1 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista | 9.3 TS1M0 | 9.3 TS1M1 |
Windows Vista for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled AIX | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.3 TS1M1 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.3 TS1M1 |
HP-UX IPF | 9.3 TS1M0 | 9.3 TS1M1 |
Linux | 9.3 TS1M0 | 9.3 TS1M1 |
Linux for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
Solaris for x64 | 9.3 TS1M0 | 9.3 TS1M1 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
SAS/ACCESS® to Teradata might return incorrect VARCHAR values using SQL pass-through. Blanks are returned instead of actual data. The problem occurs in SAS 9.3 TS1M0 and TS1M1. To resolve the problem, upgrade to 9.3 TS1M1 with a hot fix or upgrade to 9.3 TS1M2.
Type: | Problem Note |
Priority: | alert |
Date Modified: | 2012-11-23 16:07:57 |
Date Created: | 2012-11-19 11:19:27 |